package school.dao;

import java.util.List;
import java.util.Scanner;

import school.entity.Student;
import util.DBUtil;

public class DaoTest {

	public static void main(String[] args) {
		// String sql = "update examresult set score=score+? where st_id=?";
		// int r = DBUtil.executeUpdate(sql, 10, 1);
		// System.out.printf("成功的给%d人加了分数", r);

		Scanner sc = new Scanner(System.in);
		System.out.println("请输入页号：");
		int pageNo = sc.nextInt();
		System.out.println("名称条件：");
		String sname = sc.next();
		System.out.println("年级：");
		Integer grade = null;// sc.nextInt();
		List<Student> list = StudentDao.DAO.paging(pageNo, sname, grade);
		System.out.println("当前" + pageNo + " 数据如下：");
		for (Student s : list) {
			System.out.println(s);
		}
		// System.out.println("请输入学号：");
		// int no = sc.nextInt();
		// // StudentDao dao = new StudentDao();
		//
		// // Student stu = dao.get(no);
		// Student stu = StudentDao.DAO.get(no);
		// if (stu == null) {
		// System.out.println("这个学号不存在！");
		// } else {
		// System.out.println(stu);
		// }
	}
}
